 package net.go176.backpack.command;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import org.bukkit.World;
 import org.bukkit.command.Command;
 import org.bukkit.command.CommandSender;
 import org.bukkit.entity.Player;
 
 public class CmdLinks
   extends CommandBase
 {
   public CmdLinks(CommandManager cmdMan) {
     super(cmdMan);
     this.labels.add("links");
     this.description = "Show world links";
     this.permission = "mybackpack.command.links";
   }
 
   
   protected void execute(CommandSender cs, Command cmd, String label, String[] args) {
     boolean isPlayer = cs instanceof Player;
     List<World> serverWorlds = this.cmdMan.p.getServer().getWorlds();
     CommandManager.sendMsg(cs, "&2==== World Links ====");
     for (Map.Entry<String, Set<String>> entry : (Iterable<Map.Entry<String, Set<String>>>)this.cmdMan.p.getConfigManager().getWorldLinks().entrySet()) {
      String link = entry.getKey();
       Set<String> worlds = entry.getValue();
       if (link.equals("default"))
         continue; 
       CommandManager.sendMsg(cs, "&e" + link + ":");
       for (String world : worlds) {
         String msg; World w = this.cmdMan.p.getServer().getWorld(world);
         
         if (w != null) {
           serverWorlds.remove(w);
           msg = "- &a" + world;
           if (isPlayer && w.equals(((Player)cs).getWorld()))
             msg = String.valueOf(msg) + " &e(current)"; 
         } else {
           msg = "- &7" + world + " &c(not found)";
         }  CommandManager.sendMsg(cs, msg);
       } 
     } 
     CommandManager.sendMsg(cs, "&edefault:");
     for (World w : serverWorlds) {
       String msg = "- &a" + w.getName();
       if (isPlayer && w.equals(((Player)cs).getWorld()))
         msg = String.valueOf(msg) + " &e(current)"; 
       CommandManager.sendMsg(cs, msg);
     } 
   }
 
   
   protected List<String> tabComplete(CommandSender cs, Command cmd, String label, String[] args) {
     return new ArrayList<>(0);
   }
 }


/* Location:              D:\User\Xuan\Downloads\MyBackpack1.2.5.jar!\net\saralab\mybackpack\command\CmdLinks.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.1.3
 */